Skip to content

trystero: app::join is [[nodiscard]], and trystero asks for the nodiscard results rule - #6

Merged
pinhopro merged 3 commits into
mainfrom
nodiscard-results
Nov 16, 2026
Merged

pinhopro merged 3 commits into
mainfrom
nodiscard-results

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

Summary

boost::system::result carries no [[nodiscard]] of its own, so a caller that drops what
app::join returns would go on as if it had joined a room it was refused (already_joined,
too_many_rooms). app::join is now [[nodiscard]], and meta/lint.json asks for the
superproject's nodiscard results lint rule, which keeps every function of include/ that
returns boost::system::result so.

This branch stacks on crypto/secp256k1 (its own pull request): until that one merges, this one
shows its commits too. The superproject records this commit as libs/trystero in
webcpporg/webcpp's nodiscard/v0.1 pull request, which merges after the crypto and hash ones.
trystero's refactor (webcpporg/webcpp#17, trystero's refactor) rebases onto it afterwards and
keeps the attribute on its join.

Changes

  • include/webcpp/trystero/app.hpp: [[nodiscard]] on app::join (Doc Comment unchanged).
  • meta/lint.json: "nodiscard-results" and its reason.
  • doc/changelog.adoc: one line.

Verification

  • No call site changed: every test and example already uses the result. The native, wasip2, wasip3,
    Emscripten and gcc-15 lanes compile trystero's tests and examples with warnings as errors and
    report no discarded result, from scratch, in the superproject's nodiscard/v0.1 tree with this
    commit recorded: native 52, Emscripten 59, gcc-15 52 tests passed (trystero declares no WASI
    test); its oracle lane passes, 0 failed.
  • The superproject's lint, rule nodiscard results included: lint: clean (2267 compile
    commands).

🤖 Generated with Claude Code

@pinhopro
pinhopro merged commit 6ff5416 into main Nov 16, 2026
3 of 25 checks passed
@pinhopro
pinhopro deleted the nodiscard-results branch November 17, 2026 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant